#!usr/bin/env python  
#@time: 2018/01/23 
import socket
#创建一个 socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
res = s.connect(('www.baidu.com',80))
print(res)